﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace EFCore.Models;

[Table("MaterialOrder")]
public partial class MaterialOrder
{
    [Key]
    [Column("Id_MaterialOder")]
    public Guid IdMaterialOder { get; set; }

    /// <summary>
    /// 工单名
    /// </summary>
    public string MaterialOrderName { get; set; } = null!;

    /// <summary>
    /// 入库or出库
    /// </summary>
    public string Type { get; set; } = null!;

    public DateTime CreateDate { get; set; }

    [InverseProperty("TheMaterialOrederIdMaterialOderNavigation")]
    public virtual ICollection<WorkerOrder> WorkerOrders { get; set; } = new List<WorkerOrder>();

    [ForeignKey("MaterialOrdersIdMaterialOder")]
    [InverseProperty("MaterialOrdersIdMaterialOders")]
    public virtual ICollection<MaterialBase> MaterialBasesIdMaterialbases { get; set; } = new List<MaterialBase>();
}
